using StructureMap.Graph;

namespace Live.Refresh.Components
{
    public class SingeltonConvention : IRegistrationConvention
    {
        public void Process(System.Type type, StructureMap.Configuration.DSL.Registry registry)
        {
            if (type.BaseType == null) return;

            if (type.BaseType == typeof (Watchable))
            {
                registry.For(typeof (Watchable)).Singleton().Use(type);
            }
        }
    }
}